Makefile
ramdisk/Makefile
tests/Makefile
+ tests/_sanity/Makefile
tests/block-list/Makefile
tests/block-create/Makefile
tests/block-destroy/Makefile
exit 1
fi
+ # Run a few sample tests to make sure things are working
+ # before we take the plunge
+ echo "Running sanity checks..."
+ make -C tests/_sanity check 2>&1 | grep REASON
+ if [ $? -eq 0 ]; then
+ echo "Sanity checks failed"
+ exit 1
+ fi
+
}
# Get contact info if needed
# Run the tests
run_tests() {
output=$1
- echo Running tests...
+ echo Running real tests...
TEST_VERBOSE=1 make -k check > $output 2>&1
}
--- /dev/null
+#!/usr/bin/python
+
+# Copyright (C) International Business Machines Corp., 2005
+# Author: Dan Smith <danms@us.ibm.com>
+
+#
+# Test that the library and ramdisk are working to the point
+# that we can start a DomU and read /proc
+#
+
+from XmTestLib import *
+
+import re
+
+domain = XmTestDomain()
+
+try:
+ domain.start()
+except DomainError, e:
+ FAIL(str(e))
+
+try:
+ console = XmConsole(domain.getName())
+ console.sendInput("foo")
+ run = console.runCmd("cat /proc/cpuinfo")
+except ConsoleError, e:
+ FAIL(str(e))
+
+if run["return"] != 0:
+ FAIL("Unable to read /proc/cpuinfo")
+
+if not re.search("processor", run["output"]):
+ print run["output"]
+ FAIL("/proc/cpuinfo looks wrong!")
--- /dev/null
+
+SUBDIRS =
+
+TESTS = 01_domu_proc.test
+
+XFAIL_TESTS =
+
+EXTRA_DIST = $(TESTS) $(XFAIL_TESTS)
+
+TESTS_ENVIRONMENT=@TENV@
+
+%.test: %.py
+ cp $< $@
+ chmod +x $@
+
+clean-local: am_config_clean-local
+
+am_config_clean-local:
+ rm -f *test
+ rm -f *log
+ rm -f *~